#ifndef __BASE_WIN_H
#define __BASE_WIN_H

#include <QCloseEvent>
#include <QMouseEvent>
#include <QWidget>

class BaseWin : public QWidget {

public:
    BaseWin(QWidget *parent = nullptr);

protected:
    QWidget *const m_centra;

    void setup();
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void closeEvent(QCloseEvent *event) override;

private:
    QPoint m_drag_position;
    bool m_close_anim_flag = false;
    bool m_is_pressed = false;
};

#endif
